# 列表的推导式
# 基本方式
a = [x for x in range(1, 5)]
print(a)

b = [i for i in range(1,10,2)]
print(b)


# 列表推导式可以使用if
c = [i for i in range(0,10) if i % 2 ==0]
print(c)